package com.wiscamp.ninechapters.problems.enums;

/**
 * 答题卡状态枚举
 */
public enum SheetStatus {
    NOT_COMPLETED(146001, "未完成"),
    COMPLETED(146002, "已完成"),
    OBJECTIVE_PROBLEMS_REVIEWED(146003, "客观题已批改");

    private final int value;

    private final String name;

    SheetStatus(int value, String name) {
        this.value = value;
        this.name = name;
    }

    public String getName() {
        return name;
    }

    public int getValue() {
        return value;
    }

    public static SheetStatus valueOf(int value) {
        return switch (value) {
            case 146001 -> SheetStatus.NOT_COMPLETED;
            case 146002 -> SheetStatus.COMPLETED;
            case 146003 -> SheetStatus.OBJECTIVE_PROBLEMS_REVIEWED;
            default -> null;
        };
    }
}
